<h3>Statistics</h3>
Total: <%= Intrigue::Model::Project.first(:name => @project_name).entities.count %> entities
<p>
  <ul>
    <% Intrigue::Model::Entity.descendants.each do |d| %>
    <% count = Intrigue::Model::Entity.scope_by_project_and_type(@project_name,d.to_s).count %>
    <% next unless count > 0 %>
    <li>
      <a href="/<%=@project_name%>/entities?entity_types[]=<%=d.to_s%>">
      <%= d.to_s.gsub(/^.*::/, '') %></a>:
      <%= count %>
    </li>
    <% end %>
  </ul>
</p>
